<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
        <h3>替换属性值</h3>
        <input type="text" value="oldvalue" th:value="'new Value'">
        <hr color="red">
        <h3>访问属性域</h3>
        <div>访问请求域:<p th:text="${attrRequestScope }">访问请求域</p></div>
        session域<p th:text="${#session.getAttribute('attrSessionScope')}"></p>
        <br/>
        <div th:text="${session.attrSessionScope}"></div>
        <br>
        <div>application域| <p th:text="${application.attrNameAppScope}"></p></div>
        servletContext.setAttribute
        <div th:text="${application.proPath}"></div>
        <h3>获取contextPath的值</h3>
        <p th:text="@{/aa/bb/cc}">"@{}"的作用是把contextPaht的值附加到指定地址前面 </p>
        <hr color="blue">
        <h3>直接执行表达式</h3>
        <p>[[${RequestScope}]]</p>
        次不转义[[${html}]]
        [(${html})]
        <hr color="blue">
        <h3>判断字符串是否为空</h3>
        <p th:if="${not #strings.isEmpty(attrRequestScope)}">不为空</p>
        <p th:if="${#strings.isEmpty(attrRequestScope)}">为空</p>
        <hr color="blue">
        <h3>集合遍历</h3>
        <div>
            <p th:each="str: ${list}" th:text="${str}"></p>
        </div>
        <h3>包含</h3>
        <!-- :: 左边的值拼接能够找到要包含的文件 -->
        <!-- :: 右边的值拼接 代码片段的名字 -->
        <div th:insert="~{include/part ::first }"></div>
    </body>
</html>